package com.hunk.utils;

import static java.lang.System.out;
import static java.lang.System.err;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/** Print Help For Coding
 * @author Dengyx
 */
public class Print {
	public static void println(Collection<?> c) {
		out.println("---------");
		for (Object o : c) {
			out.println(o.toString());
		}
		out.println("---------");
	}
	
	public static <T> void println(T s) {
		out.println(s);
	}
	
	public static <T> void error(T s) {
		err.println(s);
	}

	public static void println(String[] result) {
		out.println("---------");
		for (int i = 0; i < result.length; i++)
			out.println(result[i]);
		out.println("---------");
	}

	@SuppressWarnings("unused")
	private static class Test {
		public static void main(String[] args) {
			Print.println("sss");
			//
			Print.println(new Exception() {
				private static final long serialVersionUID = 4844380918417419727L;

				@Override
				public String toString() {
					return "Exception";
				}
				
			});
			//
			List<String> list = new ArrayList<String>();
			list.add("hahah");
			list.add("sssssss");
			Print.println(list);
		}
	}
	
	
}
